cmake_minimum_required(VERSION 3.8)
project(src_prop_set)

define_property(SOURCE PROPERTY my_src_prop BRIEF_DOCS "src docs" FULL_DOCS "src full docs")
get_property(var1 SOURCE main.c PROPERTY my_src_prop SET)
message(STATUS "my_src_prop is set? = ${var1}")

set_property(SOURCE main.c APPEND PROPERTY my_src_prop "my_src_prop value")
get_property(var2 SOURCE main.c PROPERTY my_src_prop SET)
message(STATUS "my_src_prop is set? = ${var2}")

set_property(SOURCE main.c APPEND PROPERTY my_src_prop2 "my_src_prop2 value")
get_property(var3 SOURCE main.c PROPERTY my_src_prop2 SET)
message(STATUS "my_src_prop2 is set? = ${var3}")

set_source_files_properties(main.c math.c PROPERTIES my_src_prop3 "value1" my_src_prop4 "value2")
get_property(var4 SOURCE main.c PROPERTY my_src_prop3 SET)
message(STATUS "my_src_prop3 main.c is set? = ${var4}")
get_property(var5 SOURCE main.c PROPERTY my_src_prop4 SET)
message(STATUS "my_src_prop4 main.c is set? = ${var5}")
get_property(var4 SOURCE math.c PROPERTY my_src_prop3 SET)
message(STATUS "my_src_prop3 math.c is set? = ${var4}")
get_property(var5 SOURCE math.c PROPERTY my_src_prop4 SET)
message(STATUS "my_src_prop4 math.c is set? = ${var5}")
